package com.joy.model;

import lombok.*;

import java.sql.Timestamp;

@Setter
@Getter
public class Course {

    private Long courseId; // 使用Long类型以匹配bigint
    private String courseName; // 课程名称
    private Long teacherId; // 教师ID
    private String teacherName;// 教师名称
    private Integer classNum; // 班号
    private String description; // 课程描述
    private Timestamp createTime; // 创建时间
    private Timestamp modifyTime; // 最后修改时间

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public Long getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Long teacherId) {
        this.teacherId = teacherId;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public Integer getClassNum() {
        return classNum;
    }

    public void setClassNum(Integer classNum) {
        this.classNum = classNum;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Timestamp modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public String toString() {
        return "Course{" +
                "courseId=" + courseId +
                ", courseName='" + courseName + '\'' +
                ", teacherId=" + teacherId +
                ", teacherName='" + teacherName + '\'' +
                ", classNum=" + classNum +
                ", description='" + description + '\'' +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                '}';
    }

    public Course(Long courseId, String courseName, Long teacherId, String teacherName, Integer classNum, String description, Timestamp createTime, Timestamp modifyTime) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.classNum = classNum;
        this.description = description;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
    }
}